package cn.acmenms.exception;

/**
 * @ClassName: BusinessException
 * @Description: 业务异常处理类，重写fillInStackTrace不打印堆栈信息
 * @author: 神奇的鸭鸭
 * @Date: 2017/12/8 9:49
 */
public class BusinessException extends Exception {

    private static final long serialVersionUID = 3183475042959986421L;

    /**
     * 业务异常方法
     * @param message 异常消息
     * @param cause throwable
     */
    public BusinessException(String message, Throwable cause) {
        super(message, cause);
    }

    /**
     * 业务异常方法
     * @param message 异常消息
     */
    public BusinessException(String message) {
        super(message);
    }

    /**
     * 重写fillInStackTrace 业务异常不需要堆栈信息，提高效率
     * @return this
     */
    @Override
    public synchronized Throwable fillInStackTrace() {
        return this;
    }
}